package ${packagename}.entity.${pathPackage};

import javax.persistence.Table;

<#if table.hasDecimal == true>import java.math.BigDecimal;</#if>
<#if table.hasDate == true>import java.util.Date;</#if>

import com.ys.entity.base.BaseEntity;

/**
*/
@Table(name="`${table.tableallname}`", catalog="id")
public class ${table.classname} extends BaseEntity<${table.classname}> {

	private Long ${table.pkjavaname}; // 主键ID
<#list columnlist as column>
	<#if column.columnjavatype != "Date">
	private ${column.columnjavatype} ${column.columnjavaname}; // ${column.columncomment}
	</#if>
	<#if column.columnjavatype == "Date">
	private ${column.columnjavatype} ${column.columnjavaname}; // ${column.columncomment}
	</#if>
</#list>

	public Long get${table.pkjavaname?cap_first}() {
		return ${table.pkjavaname};
	}
	public ${table.classname} set${table.pkjavaname?cap_first}(Long ${table.pkjavaname}) {
		this.${table.pkjavaname} = ${table.pkjavaname};
		return this;
	}
<#list columnlist as column>
	public ${column.columnjavatype} get${column.columnjavaname?cap_first}() {
		return ${column.columnjavaname};
	}
	public ${table.classname} set${column.columnjavaname?cap_first}(${column.columnjavatype} ${column.columnjavaname}) {
		this.${column.columnjavaname} = ${column.columnjavaname};
		return this;
	}
</#list>

	public static ${table.classname} ${table.classname?uncap_first}(
<#list columnlist as column>
	<#if column.columnjavaname == "status">
		${column.columnjavatype} ${column.columnjavaname}
	<#elseif column.columnjavaname != "updateTime" && column.columnjavaname != "createTime">
		${column.columnjavatype} ${column.columnjavaname},
	</#if>
</#list>
			) {
		${table.classname} entity = new ${table.classname}();
<#list columnlist as column>
	<#if column.columnjavaname != "updateTime" && column.columnjavaname != "createTime">
		entity.set${column.columnjavaname?cap_first}(${column.columnjavaname});
	</#if>
</#list>
		return entity;
	}
}